import request from '@/utils/request'

export const ListBrands = (pageNum, pageSize) => {
  return request({
    url: `/admin/product/brand/page/${pageNum}/${pageSize}`,
    method: 'GET',
  })
}
export const DeleteById = id => {
  return request({
    url: `/admin/product/brand/${id}`,
    method: 'DELETE',
  })
}
export const GetById = id => {
  return request({
    url: `/admin/product/brand/${id}`,
    method: 'GET',
  })
}
export const UpdateById = data => {
  return request({
    url: `/admin/product/brand`,
    method: 'PUT',
    data,
  })
}
export const Save = data => {
  return request({
    url: `/admin/product/brand`,
    method: 'POST',
    data,
  })
}

export const ListAll = () => {
  return request({
    url: `/admin/product/brand`,
    method: 'GET',
  })
}
